package com.lone.yebserver.utils;

import com.lone.yebserver.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @author Lone
 */
public class AdminUtils {
    public static Admin getCurrentAdmin() {
        return (Admin)SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
